package com.example.serviceworkorder.pojo;

import com.baomidou.mybatisplus.annotation.Relation;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("Workorder")
public class Workorder {
    private Integer id;
    @TableField(value = "projectId", target = Project.class)
    private Integer	projectId;
    @TableField(relation = Relation.ONE_TO_MANY)
    private Project project;
    private String executor;
    private String description;
    @TableField("orderLevel")
    private Integer orderLevel;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;
}
